'use strict';

/**
 * 配置schema
 */
const mongoose = require('mongoose'), Schema = mongoose.Schema;

const configSchema = new Schema({
    _id: {type: Number}, //配置类型 0:部门，1:职位
    c_va: {type: Schema.Types.Mixed, required: true}, //JSON格式的配置数据
    c_id: {type: String}, //创建者
    m_id: {type: String}, //更新者
}, {timestamps: {createdAt: 'c_at', updatedAt: 'm_at'}});

module.exports = mongoose.model('ConfigModel', configSchema, "config");
